package com.wbp.cms.client.user.service;

import java.io.Serializable;
import java.util.List;

import com.wbp.cms.client.result.Result;
import com.wbp.cms.client.user.domain.UserDO;
import com.wbp.cms.client.user.query.UserQuery;


/**
 * @Description:
 * @Department:
 * @author andy.lhc
 * @date 2016年3月6日 下午10:24:11
 */
public interface UserService extends Serializable {

  public Result<Long> addUser(UserDO userDO);

  public Result<Boolean> modifyUser(UserDO userDO);

  public Result<UserDO> queryUserById(Long userId);

  public Result<UserDO> queryUserByUserName(String userName);
  
  public Result<List<UserDO>> queryUsers(UserQuery userQuery);
  
  /**
   * 查询当前组织机构下的所有用户
   * @param orgId
   * @return
   */
  public Result<List<UserDO>> queryUsersByOrgId(Long orgId);
  
  /**
   * 为用户选 一个组织机构
   * 
   * @param userId
   * @param organizationId
   * @return
   */
  public Result<Boolean> addOrganization2User(Long userId, Long organizationId);

  /**
   * 用户登录
   * 
   * @param userName
   * @param password
   * @return
   */
  public Result<UserDO> login(String userName, String password);

 
  
}
